#! /bin/sh
#
# Deploy all HBase dependencies which are not available via the official
# maven repository at http://repo1.maven.org.
#
#

if [ -z $HBASE_HOME ]; then
	echo "Error: HBASE_HOME is not set." 2>&1
	exit 1
fi

HBASE_LIBDIR=$HBASE_HOME/lib

# The maven repository to deploy to.
#
#REPOSITORY_URL=file:///$HOME/.m2/repository
REPOSITORY_URL=svn:https://datastore.googlecode.com/svn/maven2

OPTS="-f ../resources/wagon-svn-deploy.pom -DrepositoryId=datastore-maven2-dev"
CMD="mvn -X deploy:deploy-file $OPTS"

# HBase
#
$CMD -Dfile=$HBASE_HOME/hbase-0.19.0.jar \
	-DpomFile=../resources/hbase-0.19.0.pom -Durl=$REPOSITORY_URL

#Hadoop
#$CMD -DgroupId=org.apache -DartifactId=hadoop \
#	-Dversion=0.19.0 -Dpackaging=jar -Durl=$REPOSITORY_URL \
#	-Dfile=$HBASE_LIBDIR/hadoop-0.19.0-core.jar

#thrift
#$CMD -DgroupId=com.facebook -DartifactId=thrift \
#	-Dversion=20080411p1 -Dpackaging=jar -Durl=$REPOSITORY_URL \
#	-Dfile=$HBASE_LIBDIR/libthrift-20080411p1.jar

#apache commons cli
#$CMD -DgroupId=commons-cli -DartifactId=commons-cli \
#	-Dversion=2.0-SNAPSHOT -Dpackaging=jar -Durl=$REPOSITORY_URL \
#	-Dfile=$HBASE_LIBDIR/commons-cli-2.0-SNAPSHOT.jar

# EOF
